home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Audio
/
Patchmix
/
XWindowsSource
/
xpanel.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-03-28
|
3KB
|
136 lines
static char rcsid[] = "$Header: xpanel.c,v 1.5 91/02/13 09:47:05 mara Exp $";
/* x.c
*
* Written by Mara Helmuth
*
* Description: X graphics functions in C
* called by graphics class
* for Cmix X graphical interface
*
* $Log: xpanel.c,v $
* Revision 1.5 91/02/13 09:47:05 mara
* panel fixes (main)
*
* Revision 1.4 90/10/11 10:32:26 mara
* *** empty log message ***
*
* Revision 1.3 90/09/05 22:12:10 mara
* reset and +,-,*,/ added, many fixes
*
* Revision 1.2 90/09/02 18:19:49 mara
* NeXT fixes
*
* Revision 1.1 90/08/27 17:10:20 mara
* Initial revision
*
*/
#include "plus.h"
/************* Panel Processes *******************************************/
void reset_choice(Panel *p, Panel_item *pi)
{
Menu_item *menuitem_find();
int i;
int val;
(void) panelitem_set(panel, pi_name, LXPTEXT_VALUE, "inst1", LXPI_NULL);
(void) panelitem_set(panel, pi_srate, LXPTEXT_VALUE, "22050", LXPI_NULL);
(void) panelitem_set(panel, pi_inchans, LXPENUM_VALUE, "1", LXPI_NULL);
(void) panelitem_set(panel, pi_outchans, LXPENUM_VALUE, "1", LXPI_NULL);
canvas_clear(canvas);
XPutImage(dpy, canvas_pm, canvas_gc, add_im, 0, 0, 0, 10, 50, 50);
XPutImage(dpy, canvas_pm, canvas_gc, subtract_im, 0, 0, 0, 70, 50, 50);
XPutImage(dpy, canvas_pm, canvas_gc, multiply_im, 0, 0, 0, 130, 50, 50);
XPutImage(dpy, canvas_pm, canvas_gc, divide_im, 0, 0, 0, 190, 50, 50);
XPutImage(dpy, canvas_pm, canvas_gc, out_im, 0, 0, 0, 250, 50, 50);
canvas_flush(canvas);
ugen_no = 1;
n_ugens = 0;
first_ugen = 0;
first_conn = 1;
first_out = 1;
first_add = 1;
first_sub = 1;
first_mult = 1;
first_div = 1;
linker(RESET,ugen); // ugen is unnecessary
}
int
pi_name_proc(Panel *p, Panel_item *pi, char *s)
{
return 1;
}
int
pi_srate_proc(Panel *p, Panel_item *pi, char *s)
{
return 1;
}
void
compile(Panel *p, Panel_item *pi)
{
int i;
linker(COMPILE, ugen);
}
void
set_data(Panel *p, Panel_item *pi)
{
int i;
linker(DATA,ugen); // ugen is unnecessary
}
void
run(Panel *p, Panel_item *pi)
{
linker(RUN,ugen); // ugen is unnecessary
}
void
rescale(Panel *p, Panel_item *pi)
{
int i;
linker(RESCALE,ugen); // ugen is unnecessary
}
void
play(Panel *p, Panel_item *pi)
{
linker(PLAY,ugen); // ugen is unnecessary
}
void
quit(Panel *p, Panel_item *pi)
{
int val;
(void) panel_block(qpanel, &val);
switch (val) {
case OK:
exit(0);
break;
case NO:
break;
default:
break;
}
}
void ok(Panel *p, Panel_item *pi)
{
(void) panel_unblock(qpanel, OK);
}
void no(Panel *p, Panel_item *pi)
{
(void) panel_unblock(qpanel, NO);
}